import request from "@/utils/request";
export const submit = (data) => {
  return request({
    url: "/admin/user/submit",
    data,
  });
};
export const fileUpload = (data: File) => {
  return request({
    url: "/file/upload",
    data,
    transformRequest: (data) => {
      const formData = new FormData();
      formData.append("file", data);
      return formData;
    },
  });
};
export const getContent = (): Promise<{ content: string }> => {
  return request("/admin/editor/getContent", {
    method: "get",
  });
};
export const getSwipe = (): Promise<{ list: string[] }> => {
  return request("/admin/getSwipe", {
    method: "get",
  });
};
